<?php
/**
 * Created by PhpStorm.
 * User: Frings
 * Date: 2017-10-22
 * Time: 12:04
 */

namespace app\controllers;


use app\librarys\BaseController;
use app\models\Report;
use yii\data\Pagination;

class ReportController extends BaseController
{
    public function actionPlatformRakeFeeList()
    {
        $request = \Yii::$app->request;
        $count = Report::getPlatformRakeFeeCount();
        $pagination = new Pagination(['totalCount' => $count]);
        $items = Report::getPlatformRakeFeeList($pagination->page, $pagination->pageSize);
        return $this->render('platform-rake-fee-list',
            [
                'items' => $items,
                'pagination' => $pagination
            ]
        );
    }

    public function actionAgentRakeFeeList()
    {
        $request = \Yii::$app->request;
        $count = Report::getAgentRakeFeeCount();
        $pagination = new Pagination(['totalCount' => $count]);
        $items = Report::getAgentRakeFeeList($pagination->page, $pagination->pageSize);
        return $this->render('agent-rake-fee-list',
            [
                'items' => $items,
                'pagination' => $pagination
            ]
        );
    }
}